import { postAction, getAction,downFile} from '@/api/manage'
const gateway = '/api/gateway'

const activityList = (params) => postAction(gateway + '/jic-backend-pos/pos/storeVoucherAct/list', params) // 门店发券活动列表
const storeCouponDetail = (params) => postAction(gateway + `/jic-backend-pos/pos/storeVoucherAct/detail?actId=${params}`, {}) // 门店发券详情
const cardType = (params) => postAction(gateway + `/jic-backend-pos/pos/storeVoucherAct/cardType?isGroupCard=${params}`, {}) // 查询卡等级
// const peoplesPackage = (params) => postAction(gateway + '/basemgt-peoples/peoples/realTimePeoplePage', params) // 人群包列表
// const storePackage = (params) => postAction(gateway + '/jic-backend-activity/store/package/page', params) // 门店包列表
const storePackage = (params) => postAction(gateway + `/jic-backend-pos/pos/storeVoucherAct/pack/list?isStorePackage=${params}`, {}) // 门店包/人群包列表
const voucherModel = (params) => postAction(gateway + '/jic-backend-operation/office/voucher/showPage/list', params) // 领券模板
const editVoucher = (params) => postAction(gateway + '/jic-backend-pos/pos/storeVoucherAct/createOrUpdate', params) // 创建、编辑
const voucherList = (params) => postAction(gateway + '/jic-backend-pos/pos/storeVoucherAct/vouchePack/list', params) // 券包列表
const editActive = (params) => postAction(gateway + '/jic-backend-pos/pos/storeVoucherAct/updateStatus', params) // 修改门店发券活动状态
const storeVouLog = (params) => postAction(gateway + '/jic-backend-pos/pos/storeVoucherAct/operate/log', params) // 门店发券日志
const searchVou = (params) => postAction(gateway +  `/jic-backend-pos/pos/storeVoucherAct/voucherRule?awardIds=${params}`, {}) // 券搜索
const searchGuide = (params) => postAction(gateway + '/jic-backend-pos/pos/storeVoucherAct/guide', params) // 搜索导购
const exportExcel = (params) => downFile(gateway + '/jic-backend-pos/pos/storeVoucherAct/export', params) // 导出
const inportVerify = (params) => postAction(gateway + '/jic-backend-pos/pos/storeVoucherAct/createCheck', params) // 导入文件校验
export {
    activityList,
    storeCouponDetail,
    cardType,
    // peoplesPackage,
    storePackage,
    voucherModel,
    editVoucher,
    voucherList,
    editActive,
    storeVouLog,
    searchVou,
    searchGuide,
    exportExcel,
    inportVerify
}
